<!DOCTYPE html>
<html>
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  <script>
    let str = 'Hello ECMAScript 2015';
    let r1 = str.startsWith('Hello');
    console.log(r1); // ture
    let r2 = str.endsWith('2016');
    console.log(r2); // false
  </script>
</body>
</html>